using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;

using ILRuntime.CLR.TypeSystem;
using ILRuntime.CLR.Method;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;
using ILRuntime.Runtime.Stack;
using ILRuntime.Reflection;
using ILRuntime.CLR.Utils;
using System.Linq;

namespace ILRuntime.Runtime.Generated
{
    unsafe class huqiang_Core_Line_ArcLine_Binding
    {
        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
        {
            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
            FieldInfo field;
            Type[] args;
            Type type = typeof(huqiang.Core.Line.ArcLine);

            field = type.GetField("lineBase", flag);
            app.RegisterCLRFieldGetter(field, get_lineBase_0);
            app.RegisterCLRFieldSetter(field, set_lineBase_0);
            app.RegisterCLRFieldBinding(field, CopyToStack_lineBase_0, AssignFromStack_lineBase_0);
            field = type.GetField("Pos", flag);
            app.RegisterCLRFieldGetter(field, get_Pos_1);
            app.RegisterCLRFieldSetter(field, set_Pos_1);
            app.RegisterCLRFieldBinding(field, CopyToStack_Pos_1, AssignFromStack_Pos_1);
            field = type.GetField("Scale", flag);
            app.RegisterCLRFieldGetter(field, get_Scale_2);
            app.RegisterCLRFieldSetter(field, set_Scale_2);
            app.RegisterCLRFieldBinding(field, CopyToStack_Scale_2, AssignFromStack_Scale_2);
            field = type.GetField("Angle", flag);
            app.RegisterCLRFieldGetter(field, get_Angle_3);
            app.RegisterCLRFieldSetter(field, set_Angle_3);
            app.RegisterCLRFieldBinding(field, CopyToStack_Angle_3, AssignFromStack_Angle_3);
            field = type.GetField("Dic", flag);
            app.RegisterCLRFieldGetter(field, get_Dic_4);
            app.RegisterCLRFieldSetter(field, set_Dic_4);
            app.RegisterCLRFieldBinding(field, CopyToStack_Dic_4, AssignFromStack_Dic_4);
            field = type.GetField("Radius", flag);
            app.RegisterCLRFieldGetter(field, get_Radius_5);
            app.RegisterCLRFieldSetter(field, set_Radius_5);
            app.RegisterCLRFieldBinding(field, CopyToStack_Radius_5, AssignFromStack_Radius_5);
            field = type.GetField("Precision", flag);
            app.RegisterCLRFieldGetter(field, get_Precision_6);
            app.RegisterCLRFieldSetter(field, set_Precision_6);
            app.RegisterCLRFieldBinding(field, CopyToStack_Precision_6, AssignFromStack_Precision_6);
            field = type.GetField("Closed", flag);
            app.RegisterCLRFieldGetter(field, get_Closed_7);
            app.RegisterCLRFieldSetter(field, set_Closed_7);
            app.RegisterCLRFieldBinding(field, CopyToStack_Closed_7, AssignFromStack_Closed_7);

            app.RegisterCLRMemberwiseClone(type, PerformMemberwiseClone);

            app.RegisterCLRCreateDefaultInstance(type, () => new huqiang.Core.Line.ArcLine());
            app.RegisterCLRCreateArrayInstance(type, s => new huqiang.Core.Line.ArcLine[s]);


        }

        static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject* ptr_of_this_method, IList<object> __mStack, ref huqiang.Core.Line.ArcLine instance_of_this_method)
        {
            ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
            switch(ptr_of_this_method->ObjectType)
            {
                case ObjectTypes.Object:
                    {
                        __mStack[ptr_of_this_method->Value] = instance_of_this_method;
                    }
                    break;
                case ObjectTypes.FieldReference:
                    {
                        var ___obj = __mStack[ptr_of_this_method->Value];
                        if(___obj is ILTypeInstance)
                        {
                            ((ILTypeInstance)___obj)[ptr_of_this_method->ValueLow] = instance_of_this_method;
                        }
                        else
                        {
                            var t = __domain.GetType(___obj.GetType()) as CLRType;
                            t.SetFieldValue(ptr_of_this_method->ValueLow, ref ___obj, instance_of_this_method);
                        }
                    }
                    break;
                case ObjectTypes.StaticFieldReference:
                    {
                        var t = __domain.GetType(ptr_of_this_method->Value);
                        if(t is ILType)
                        {
                            ((ILType)t).StaticInstance[ptr_of_this_method->ValueLow] = instance_of_this_method;
                        }
                        else
                        {
                            ((CLRType)t).SetStaticFieldValue(ptr_of_this_method->ValueLow, instance_of_this_method);
                        }
                    }
                    break;
                 case ObjectTypes.ArrayReference:
                    {
                        var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as huqiang.Core.Line.ArcLine[];
                        instance_of_arrayReference[ptr_of_this_method->ValueLow] = instance_of_this_method;
                    }
                    break;
            }
        }


        static object get_lineBase_0(ref object o)
        {
            return ((huqiang.Core.Line.ArcLine)o).lineBase;
        }

        static StackObject* CopyToStack_lineBase_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Core.Line.ArcLine)o).lineBase;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_lineBase_0(ref object o, object v)
        {
            huqiang.Core.Line.ArcLine ins =(huqiang.Core.Line.ArcLine)o;
            ins.lineBase = (huqiang.Core.Line.LineBase)v;
            o = ins;
        }

        static StackObject* AssignFromStack_lineBase_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            huqiang.Core.Line.LineBase @lineBase = (huqiang.Core.Line.LineBase)typeof(huqiang.Core.Line.LineBase).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
            huqiang.Core.Line.ArcLine ins =(huqiang.Core.Line.ArcLine)o;
            ins.lineBase = @lineBase;
            o = ins;
            return ptr_of_this_method;
        }

        static object get_Pos_1(ref object o)
        {
            return ((huqiang.Core.Line.ArcLine)o).Pos;
        }

        static StackObject* CopyToStack_Pos_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Core.Line.ArcLine)o).Pos;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_Pos_1(ref object o, object v)
        {
            huqiang.Core.Line.ArcLine ins =(huqiang.Core.Line.ArcLine)o;
            ins.Pos = (UnityEngine.Vector2)v;
            o = ins;
        }

        static StackObject* AssignFromStack_Pos_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            UnityEngine.Vector2 @Pos = (UnityEngine.Vector2)typeof(UnityEngine.Vector2).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
            huqiang.Core.Line.ArcLine ins =(huqiang.Core.Line.ArcLine)o;
            ins.Pos = @Pos;
            o = ins;
            return ptr_of_this_method;
        }

        static object get_Scale_2(ref object o)
        {
            return ((huqiang.Core.Line.ArcLine)o).Scale;
        }

        static StackObject* CopyToStack_Scale_2(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Core.Line.ArcLine)o).Scale;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_Scale_2(ref object o, object v)
        {
            huqiang.Core.Line.ArcLine ins =(huqiang.Core.Line.ArcLine)o;
            ins.Scale = (UnityEngine.Vector2)v;
            o = ins;
        }

        static StackObject* AssignFromStack_Scale_2(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            UnityEngine.Vector2 @Scale = (UnityEngine.Vector2)typeof(UnityEngine.Vector2).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
            huqiang.Core.Line.ArcLine ins =(huqiang.Core.Line.ArcLine)o;
            ins.Scale = @Scale;
            o = ins;
            return ptr_of_this_method;
        }

        static object get_Angle_3(ref object o)
        {
            return ((huqiang.Core.Line.ArcLine)o).Angle;
        }

        static StackObject* CopyToStack_Angle_3(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Core.Line.ArcLine)o).Angle;
            __ret->ObjectType = ObjectTypes.Float;
            *(float*)&__ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_Angle_3(ref object o, object v)
        {
            huqiang.Core.Line.ArcLine ins =(huqiang.Core.Line.ArcLine)o;
            ins.Angle = (System.Single)v;
            o = ins;
        }

        static StackObject* AssignFromStack_Angle_3(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Single @Angle = *(float*)&ptr_of_this_method->Value;
            huqiang.Core.Line.ArcLine ins =(huqiang.Core.Line.ArcLine)o;
            ins.Angle = @Angle;
            o = ins;
            return ptr_of_this_method;
        }

        static object get_Dic_4(ref object o)
        {
            return ((huqiang.Core.Line.ArcLine)o).Dic;
        }

        static StackObject* CopyToStack_Dic_4(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Core.Line.ArcLine)o).Dic;
            __ret->ObjectType = ObjectTypes.Float;
            *(float*)&__ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_Dic_4(ref object o, object v)
        {
            huqiang.Core.Line.ArcLine ins =(huqiang.Core.Line.ArcLine)o;
            ins.Dic = (System.Single)v;
            o = ins;
        }

        static StackObject* AssignFromStack_Dic_4(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Single @Dic = *(float*)&ptr_of_this_method->Value;
            huqiang.Core.Line.ArcLine ins =(huqiang.Core.Line.ArcLine)o;
            ins.Dic = @Dic;
            o = ins;
            return ptr_of_this_method;
        }

        static object get_Radius_5(ref object o)
        {
            return ((huqiang.Core.Line.ArcLine)o).Radius;
        }

        static StackObject* CopyToStack_Radius_5(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Core.Line.ArcLine)o).Radius;
            __ret->ObjectType = ObjectTypes.Float;
            *(float*)&__ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_Radius_5(ref object o, object v)
        {
            huqiang.Core.Line.ArcLine ins =(huqiang.Core.Line.ArcLine)o;
            ins.Radius = (System.Single)v;
            o = ins;
        }

        static StackObject* AssignFromStack_Radius_5(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Single @Radius = *(float*)&ptr_of_this_method->Value;
            huqiang.Core.Line.ArcLine ins =(huqiang.Core.Line.ArcLine)o;
            ins.Radius = @Radius;
            o = ins;
            return ptr_of_this_method;
        }

        static object get_Precision_6(ref object o)
        {
            return ((huqiang.Core.Line.ArcLine)o).Precision;
        }

        static StackObject* CopyToStack_Precision_6(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Core.Line.ArcLine)o).Precision;
            __ret->ObjectType = ObjectTypes.Float;
            *(float*)&__ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_Precision_6(ref object o, object v)
        {
            huqiang.Core.Line.ArcLine ins =(huqiang.Core.Line.ArcLine)o;
            ins.Precision = (System.Single)v;
            o = ins;
        }

        static StackObject* AssignFromStack_Precision_6(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Single @Precision = *(float*)&ptr_of_this_method->Value;
            huqiang.Core.Line.ArcLine ins =(huqiang.Core.Line.ArcLine)o;
            ins.Precision = @Precision;
            o = ins;
            return ptr_of_this_method;
        }

        static object get_Closed_7(ref object o)
        {
            return ((huqiang.Core.Line.ArcLine)o).Closed;
        }

        static StackObject* CopyToStack_Closed_7(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Core.Line.ArcLine)o).Closed;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method ? 1 : 0;
            return __ret + 1;
        }

        static void set_Closed_7(ref object o, object v)
        {
            huqiang.Core.Line.ArcLine ins =(huqiang.Core.Line.ArcLine)o;
            ins.Closed = (System.Boolean)v;
            o = ins;
        }

        static StackObject* AssignFromStack_Closed_7(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Boolean @Closed = ptr_of_this_method->Value == 1;
            huqiang.Core.Line.ArcLine ins =(huqiang.Core.Line.ArcLine)o;
            ins.Closed = @Closed;
            o = ins;
            return ptr_of_this_method;
        }


        static object PerformMemberwiseClone(ref object o)
        {
            var ins = new huqiang.Core.Line.ArcLine();
            ins = (huqiang.Core.Line.ArcLine)o;
            return ins;
        }


    }
}
